package com.zxy.ziems.server.energy.mapper;

import com.zxy.ziems.server.board.pojo.vo.DosageVo;
import com.zxy.ziems.server.energy.pojo.entity.DeviceMeasureDataHistoryOldEntity;
import com.zxy.ziems.server.mybatis.core.mapper.BaseMapperX;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface DeviceMeasureDataHistoryOldMapper extends BaseMapperX<DeviceMeasureDataHistoryOldEntity> {

    /**
     * 按dataformat进行统计汇总
     *
     * @param classifyIds 分类ID集
     * @param dataTypeId
     * @param startDate
     * @param endDate
     * @return
     */
    List<DosageVo> sumByDateTypeAndClassifyIds(@Param("classifyIds") List<String> classifyIds, @Param("dataTypeId") String dataTypeId,
                                               @Param("startDate") LocalDate startDate, @Param("endDate") LocalDate endDate, @Param("dateFormat") String dateFormat);
}
